.netCHARTING v5.2 Documentation Send comments on this topic.
Scale Synchronization
Getting Started > General Tutorials > Axis Tutorials > Axis Scales > Scale Synchronization

Glossary Item Box

Introduction

Multiple axes of the same type (numeric or time) and orientation (X or Y) can synchronize their scales in a number of ways. They can sync their entire scale, only high or low values, and the origin positions. This is useful if you are using many axes on a single chart that need to sync or different axes throughout chart areas that need to stay on the same scale.

To synchronize two axes, simply specify which axis you want another axis to sync with.

[C#]

Chart.YAxis.SynchronizeScale.Add(myNewAxis);

[Visual Basic]

Chart.YAxis.SynchronizeScale.Add(myNewAxis)

You can add as many axes to synchronize as you'd like. By default the entire scale will sync but if you would like to change this behavior you can specify a SynchronizeScaleMode enumeration.

[C#]

Chart.YAxis.SynchronizeScale.Mode = SynchronizeScaleMode.High;

[Visual Basic]

Chart.YAxis.SynchronizeScale.Mode = SynchronizeScaleMode.High

This will cause the axes to sync only the high values.

Synchronization Chain

This system also allows for complex sync chains.  The above synchronizes the main y axis high value with the high value of myNewAxis. If you would like to synchronize the low value of myNewAxis with another axis you can do this also:

[C#]

myNewAxis.SynchronizeScale.Add(myOtherAxis);
myNewAxis.SynchronizeScale.Mode = SynchronizeScaleMode.Low;

[Visual Basic]

myNewAxis.SynchronizeScale.Add(myOtherAxis);
myNewAxis.SynchronizeScale.Mode = SynchronizeScaleMode.Low

This will result in different synchronizations between different axes.

©2008. All Rights Reserved.